package com.shsoft.component;

import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;

import java.io.Serializable;


public class BaseComponent implements Serializable {

    private static final long serialVersionUID = 1L;

    private ComponentType type;

    private int x;

    private int y;

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public ComponentType getType() {
        return type;
    }

    public void setType(ComponentType type) {
        this.type = type;
    }


    public void drawComponent(GraphicsContext gc) {}

    public void drawComponentToSmallCanvas(GraphicsContext gc) {}

    public void drawComponentBorder(Canvas canvas){}

    public boolean isMe(double x, double y){
        return false;
    }

    public enum ComponentType {
        IMAGE,
        TEXT,
        SHAPE,
        BAR,
        DATA,
    }
}
